<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>供应商账号详情</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
<div>
    <div>
        <div >
            <form id="formSet1">
                <div class="fieldset1 tabel_col clearFix">
					<div class="fieldBox col_50">
						<div class="label">账号类型</div>
						<div class="field">
							<span id="bizTypCdNm" name="bizTypCdNm"></span>
						</div>
					</div>
                    <div class="fieldBox col_50">
	                    <div class="label">收款方</div>
	                    <div class="field">
	                    	<span id="rcptUnt" name="rcptUnt"></span>
	                    </div>
	                </div>
                    <div class="fieldBox col_50">
	                    <div class="label">收款账号</div>
	                    <div class="field">
	                    	<span id="accNo" name="accNo"></span>
	                    </div>
	                </div>
                    <div class="fieldBox col_50">
	                    <div class="label">开户行</div>
	                    <div class="field">
	                    	<span id="bkNm" name="bkNm"></span>
	                    </div>
	                </div>
                    <div class="fieldBox col_50">
	                    <div class="label">开户行行号</div>
	                    <div class="field">
	                    	<span id="bkNo" name="bkNo"></span>
	                    </div>
	                </div>
					<c:if test="${bizTypCd != 0}">
						<div class="fieldBox col_50">
							<div class="label">银行预留手机号</div>
							<div class="field">
								<span id="bkResTel" name="bkResTel"></span>
							</div>
						</div>
						<div class="fieldBox col_50">
							<div class="label">收款方身份证号</div>
							<div class="field">
								<span id="certNo" name="certNo"></span>
							</div>
						</div>
					</c:if>
					<div class="fieldBox col_50">
						<div class="label">联系方式</div>
						<div class="field">
							<span id="contTel" name="contTel"></span>
						</div>
					</div>
                    <div class="fieldBox col_50">
	                    <div class="label">区域</div>
	                    <div class="field">
	                    	<span id="rgnNms" name="rgnNms"></span>
	                    </div>
	                </div>
	                <div class="fieldBox col_50">
	                    <div class="label">账户用途</div>
	                    <div class="field">
	                    	<span id="purpCdNm" name="purpCdNm"></span>
	                    </div>
	                </div>
	                <div class="fieldBox col_100">
	                    <div class="label">备注</div>
	                    <div class="field">
	                    	<span id="bkRem" name="bkRem"></span>
	                    	<input name="bkId" id="bkId" type="hidden" value="${id }">
	                    </div>
	                </div>
	                <c:if test="${isFlow==1 }">
		                <div class="fieldBox col_100">
		                    <div class="label">供应商</div>
		                    <div class="field">
		                    	<a href="javascript:showSplDetail()" class="link">
	                    			<span id="splNm" name="splNm">${splNm }</span>
		                    	</a>
		                    	<input name="splId" id="splId" type="hidden" value="${splId }">
		                    </div>
		                </div>
	                </c:if>
	                <div class="fieldBox col_100">
	                    <div class="label">资料</div>
	                    <div class="field">
		                    <jsp:include page="../../system/sysUlFilesRec/sysUlFileRecListDetail.jsp" flush="true" >
	                    		<jsp:param name="pkId" value="${id }"/>
	                    		<jsp:param name="tabNm" value="SPL_BANK_ACC"/>
	                    	</jsp:include>
		                </div>
	                </div>
                </div>
            </form>
        </div>
    </div>
</div>
</div>


<script type="text/javascript">
$(function(){
	
	var formSet1 = $('#formSet1').ligerForm({
	        validate : true
	});
	
	initData();
});
	//定义父级调用事件
	frameElement.dialog.onCancel = function () {
	    frameElement.dialog.close();
	}

	function initData(){
		var id = $("#bkId").val();
    	if(!id)return;
    	var _url = '<%=path%>/product/splBank/getById.do';
    	$.ajax({
    		type: 'get',
    		dataType:'json',
    		data:{id:id},
    		url: _url,
    		success:function(msg){
    			 if(msg.success == 1){
    				 setData(msg.data);//设置数据
    			 }else{
    				 $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
   	}
		
	//设置页面数据
    function setData(data){
    	var form = liger.get("formSet1");
    	$("#rcptUnt").html(data.rcptUnt);
    	$("#accNo").html(data.accNo);
    	$("#bkNm").html(data.bkNm);
    	$("#bkNo").html(data.bkNo);
    	$("#bkRem").html(data.bkRem);
    	$("#rgnNms").html(data.rgnNms);
    	$("#bizTypCdNm").html(data.bizTypCdNm);
    	$("#purpCdNm").html(data.purpCdNm);
    	$("#contTel").html(data.contTel);
    	$("#certNo").html(data.certNo);
    	$("#bkResTel").html(data.bkResTel);
	};
	
	function showSplDetail(){
		var splId = $("#splId").val();
		if(StringUtils.isNotEmpty(splId)){
			Add_navTab('splInfo'+splId,'供应商详情','<%=path%>/product/splInfo/toDetailPage.do?id='+splId);
		}
	}

</script>



</body>
</html>
